﻿using System;

namespace _07_构造函数的相互调用
{
    class Program
    {
        static void Main(string[] args)
        {

            //调用无参数的构造函数
            Production p1 = new Production();
            Console.WriteLine($" 产品编号：{p1.ProductID}\n 产品名称：{p1.ProductName}\n 生产日期：{p1.ProductDate:D}\n");

            //调用两个参娄的构造函数
            Production p2 = new Production("我自由名称二号货",new DateTime(2017,12,12));
            //Production p2 = new Production(new string ("我自由名称二号货"),new DateTime(2017,12,12));
            Console.WriteLine($"产品编号：{p2.ProductID}\n产品名称：{p2.ProductName}\n生产日期：{p2.ProductDate:D}\n");
        }
    }
}
